package cn.dmrliu.edu.publish.mapper;

import cn.dmrliu.edu.publish.bean.ToolVideoChapter;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface ToolVideoChapterMapper {
    @Select("select \n" +
            "  chapter_id,\n" +
            "  chapter_name,\n" +
            "  sum(play_ct) play_ct,\n" +
            "  sum(dur_sum) dur_sum,\n" +
            "  sum(play_num) play_num\n" +
            "from dws_tool_video_chapter_window\n" +
            "where toYYYYMMDD(stt) = #{date}\n" +
            "group by chapter_id,chapter_name;")
    List<ToolVideoChapter> selectVideoChapter(Integer date);
}
